//
//  PhotoThumbnailScrollView.h
//  AiQiChe
//
//  Created by lian jie on 8/1/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
@protocol PhotoThumbnailScrollViewDelegate;
@protocol PhotoThumbnailScrollViewDatasource;

@interface PhotoThumbnailScrollView : UIScrollView <UIScrollViewDelegate>{
    id<PhotoThumbnailScrollViewDatasource> _datasource;
    id<PhotoThumbnailScrollViewDelegate> _selectionDelegate;
    NSMutableSet *_recycledViewSet;
    int _oldFirstIndex;
    int _oldLastIndex;
}
@property (nonatomic,assign) id<PhotoThumbnailScrollViewDatasource> datasource;
@property (nonatomic,assign) id<PhotoThumbnailScrollViewDelegate> selectionDelegate;

- (void)scrollToIndex:(int)index;
@end

@protocol PhotoThumbnailScrollViewDatasource <NSObject>
- (NSString*)photoThumbnailScrollView:(PhotoThumbnailScrollView*)thumbnailScrollView
                      imageUrlAtIndex:(int)index;
- (int)numberOfImagesInPhotoThumbnailScrollView:(PhotoThumbnailScrollView*)thumbnailScrollView;
@end

@protocol PhotoThumbnailScrollViewDelegate <NSObject>
@optional
- (void)photoThumbnailScrollView:(PhotoThumbnailScrollView*)thumbnailScrollView
            imageSelectedAtIndex:(int)index;
@end